package test;

import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

/**
 * @author 郝文雪
 * @date 2022/8/31 19:48
 * @Description Test
 */
public class 途虎2 {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String s=sc.nextLine();
        StringBuilder sb=new StringBuilder();
        if(s.charAt(0)=='-'){
            int[] arr=new int[s.length()-1];
            for(int i=0;i<arr.length;i++){
                arr[i]=s.charAt(i+1)-'0';
            }
            Arrays.sort(arr);
            for (int i = 0,j=arr.length-1; i < j; i++,j--) {
                int tmp=arr[i];
                arr[i]=arr[j];
                arr[j]=tmp;
            }
            sb.append("-");
            for (int i = 0; i < arr.length; i++) {
                sb.append(arr[i]);
            }
        }else{
            int[] arr2=new int[s.length()];
            for(int i=0;i<arr2.length;i++){
                arr2[i]=s.charAt(i)-'0';
            }
            Arrays.sort(arr2);
            for(int i=0;i<arr2.length;i++){
                if (arr2[0] == 0) {
                    int tmp = arr2[0];
                    arr2[0] = arr2[1];
                    arr2[1] = tmp;
                }
                sb.append(arr2[i]);
            }
        }
        System.out.println(sb.toString());
    }
}
